﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Mailbox.aspx.cs" Inherits="BlackEagleClient.Mailbox" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    
                      <asp:LoginView ID="LoginView1" runat="server" 
        onviewchanged="LoginView1_ViewChanged">
    <RoleGroups>
    <asp:RoleGroup Roles="Premium">
    <ContentTemplate>
         <div id="mailContainer">
         <div id="mailList">
            <asp:DataList runat="server" ID="MailDataList">  
            <ItemTemplate>
            <asp:HyperLink ID="MailLink" NavigateUrl='<%#"Mailbox.aspx?id=" + Eval("ID")%>' runat="server">
                <div class="mail" runat="server">
                <p id="MailSender"><%# Eval("Name")%></p>
                <p id="MailSubject"><%# Eval("Subject") %></p>
                <hr />
            </div>
            </asp:HyperLink>
            </ItemTemplate>
          </asp:DataList>

          </div>
          <div id="mailContent">

          <asp:Label ID="MailContentTxt" runat="server"></asp:Label>

          </div>
          </div>

    </ContentTemplate>
    </asp:RoleGroup>

    <asp:RoleGroup Roles="Free">
        <ContentTemplate>
            <h1>Buy Premium today! Only 99.99$!</h1>
            <h2>30% Off!</h2>
        </ContentTemplate>
    </asp:RoleGroup>

    </RoleGroups>
    </asp:LoginView>

 

    <script type="text/javascript">
        //Lyssa på "mail"-taggar och skicka med MailId till en metod som visar mailet

        $(document).ready(function () {

//            $(".Mail").click(function () {

//                $(this).css({ 'border': '2px SOLID #000' });
//                var id = $(this).find("#MailId").text();

//            });

        });



    </script>

</asp:Content>
